package nccloud.impl.pub.erm.ytd;

import java.util.Map;

import com.alibaba.fastjson.JSONObject;


public class CwgxYtdProcessor {
	
	public Map<String, String>  execute(String req) throws Exception {
		JSONObject reqJson = JSONObject.parseObject(req);
		CwgxYtdBefore cwgxBefore = new CwgxYtdBefore();
		cwgxBefore.beforeCheck(reqJson);
		CwgxYtdExecute cwbxExecute = new CwgxYtdExecute();
		Object resultData = cwbxExecute.execute(reqJson);
		if(resultData instanceof Map) {
			return (Map<String, String>) resultData;
		}
		CwgxYtdAfter cwbxAfter = new CwgxYtdAfter();
		return cwbxAfter.after(resultData,reqJson.get("action").toString());
	}
	

}
